package com.kust.smarthome.web;

import com.kust.smarthome.web.socketserver.SocketServer;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;

@SpringBootApplication
@MapperScan("com.kust.smarthome.web.mapper")
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class SmarthomewebApplication {

    public static void main(String[] args) throws Exception {
        ApplicationContext applicationContext = SpringApplication.run(SmarthomewebApplication.class, args);
        applicationContext.getBean(SocketServer.class).service();
    }

}
